package com.ruoyi.perfumes.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.perfumes.mapper.ExPerfumesMapper;
import com.ruoyi.perfumes.domain.ExPerfumes;
import com.ruoyi.perfumes.service.IExPerfumesService;

/**
 * 香水管理-子菜单Service业务层处理
 * 
 * @author 董虹妤
 * @date 2024-04-11
 */
@Service
public class ExPerfumesServiceImpl implements IExPerfumesService 
{
    @Autowired
    private ExPerfumesMapper exPerfumesMapper;

    /**
     * 查询香水管理-子菜单
     * 
     * @param id 香水管理-子菜单主键
     * @return 香水管理-子菜单
     */
    @Override
    public ExPerfumes selectExPerfumesById(Long id)
    {
        return exPerfumesMapper.selectExPerfumesById(id);
    }

    /**
     * 查询香水管理-子菜单列表
     * 
     * @param exPerfumes 香水管理-子菜单
     * @return 香水管理-子菜单
     */
    @Override
    public List<ExPerfumes> selectExPerfumesList(ExPerfumes exPerfumes)
    {
        return exPerfumesMapper.selectExPerfumesList(exPerfumes);
    }

    /**
     * 新增香水管理-子菜单
     * 
     * @param exPerfumes 香水管理-子菜单
     * @return 结果
     */
    @Override
    public int insertExPerfumes(ExPerfumes exPerfumes)
    {
        exPerfumes.setCreateTime(DateUtils.getNowDate());
        return exPerfumesMapper.insertExPerfumes(exPerfumes);
    }

    /**
     * 修改香水管理-子菜单
     * 
     * @param exPerfumes 香水管理-子菜单
     * @return 结果
     */
    @Override
    public int updateExPerfumes(ExPerfumes exPerfumes)
    {
        exPerfumes.setUpdateTime(DateUtils.getNowDate());
        return exPerfumesMapper.updateExPerfumes(exPerfumes);
    }

    /**
     * 批量删除香水管理-子菜单
     * 
     * @param ids 需要删除的香水管理-子菜单主键
     * @return 结果
     */
    @Override
    public int deleteExPerfumesByIds(Long[] ids)
    {
        return exPerfumesMapper.deleteExPerfumesByIds(ids);
    }

    /**
     * 删除香水管理-子菜单信息
     * 
     * @param id 香水管理-子菜单主键
     * @return 结果
     */
    @Override
    public int deleteExPerfumesById(Long id)
    {
        return exPerfumesMapper.deleteExPerfumesById(id);
    }
}
